package com.micro.service.rpc.fallback;

import com.micro.service.entity.ResponseMessage;
import com.micro.service.model.UserArticle;
import com.micro.service.rpc.RpcUserArticle;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * Create by Vic Xu on 2019/3/24
 */
@Component
public class RpcUserArticleFallback implements RpcUserArticle {
    @Override
    public ResponseMessage<List<UserArticle>> getAll() {
        return ResponseMessage.fallback(200, "服务繁忙");
    }

    @Override
    public ResponseMessage<List<UserArticle>> findByCardId(UserArticle userArticle) {
        return ResponseMessage.fallback(200, "服务繁忙");
    }

    @Override
    public ResponseMessage<UserArticle> saveUserArticle(UserArticle userArticle) {
        return ResponseMessage.fallback(200, "服务繁忙");
    }

    @Override
    public ResponseMessage<UserArticle> updateUserArticle(UserArticle userArticle) {
        return ResponseMessage.fallback(200, "服务繁忙");
    }

    @Override
    public ResponseMessage<String> deleteUserArticle(String id) {
        return ResponseMessage.fallback(200, "服务繁忙");
    }
}
